import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import vue from '@vitejs/plugin-vue';
import { lazyImport, VxeResolver } from 'vite-plugin-lazy-import';
import path from 'path';

export default defineConfig({
    plugins: [
        laravel({
            input: ['resources/css/app.css', 'resources/js/app.js'],
            refresh: true,
        }),
        vue(),
        lazyImport({
            resolvers: [
              VxeResolver({
                libraryName: 'vxe-table'
              }),
              VxeResolver({
                libraryName: 'vxe-pc-ui'
              })
            ]
          })
    ],
    resolve: {
      alias: {
        '@': path.resolve(__dirname, 'resources/js')
      }
    }
});
